package scalab.core.utils

import scalab.core.component.{Component, Filter}

trait ProductDirectories extends Filter{

	val components = mandatoryIn
	
	def execute: Boolean = {
		//info("components: " + (allSourceComponents map {c => c.name + " " + c.productDirectories.mkString("","","")}).mkString("\n","\n",""))
		//impose(components.sources flatMap {s => s.component.canonicalProductDirectories})
		impose(components.providers flatMap {p => p.canonicalProductDirectories})
		//info("outputed: " + productDependencies)
		
		true
	}

	def instanceId: String = ""
}

object ProductDirectories{

	def apply(componentName: String): ProductDirectories = new ProductDirectories{
		override val name: String = componentName
	}
	def apply(): ProductDirectories = apply("ProductDirs")
}
